Skip to content

Add ADDITIONALFLAGS environment variable#29

Merged
EvilOlaf merged 4 commits intomainfrom
additionalflags
Jan 5, 2026
Merged

Add ADDITIONALFLAGS environment variable#29
EvilOlaf merged 4 commits intomainfrom
additionalflags

Conversation

@EvilOlaf
Copy link
Owner

@EvilOlaf EvilOlaf commented Jan 5, 2026

Allows setting various parameters which will be passed on to SCUMserver.exe like -nobattleye to disable anti-cheat.
In future there may be further switches or parameters introduced upstream so this also hardens the overall setup for the future.

Summary by CodeRabbit

  • Documentation

    • Added an FAQ entry explaining how to disable BattlEye anti-cheat with step‑by‑step instructions.
  • New Features

    • Server startup supports passing additional configuration flags via configuration, enabling greater customization without code changes.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

Walkthrough

Adds an ADDITIONALFLAGS environment variable, documents using it to disable BattlEye, and injects the variable into the SCUMServer startup command in the startup script.

Changes

Cohort / File(s) Summary
Documentation
README.md
Added FAQ entry explaining how to disable BattlEye by setting ADDITIONALFLAGS="-nobattleye" in docker-compose.yml.
Configuration
docker-compose.yml
Added ADDITIONALFLAGS env var (empty string) to the scum-server service.
Startup script
start-server.sh
Expanded the backgrounded xvfb-run invocation to include "${ADDITIONALFLAGS}", passing env-driven flags into the server command.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant DockerCompose as docker-compose
  participant Container as Container (env)
  participant StartScript as start-server.sh
  participant Xvfb as xvfb-run
  participant SCUM as SCUMServer

  Note over User,DockerCompose: User sets ADDITIONALFLAGS in docker-compose.yml
  User->>docker-compose: docker compose up
  docker-compose->>Container: start container with env ADDITIONALFLAGS
  Container->>StartScript: invoke start-server.sh
  StartScript->>Xvfb: run xvfb-run ... "${ADDITIONALFLAGS}" &
  Xvfb->>SCUM: launch SCUMServer with expanded flags
  alt ADDITIONALFLAGS contains "-nobattleye"
    Note right of SCUM: SCUMServer started without BattlEye
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰
A carrot flag tucked in docker's nest,
ADDITIONALFLAGS whispers to the rest.
Scripts stretch their paws and pass it along,
BattlEye bows out as the server hums its song. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely captures the main change: adding a new ADDITIONALFLAGS environment variable that enables passing additional parameters to the SCUMserver startup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3b49c52 and 5923a42.

📒 Files selected for processing (1)
  • start-server.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • start-server.sh
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
start-server.sh (1)

72-72: Consider using unquoted expansion for better multi-flag support.

The current quoted expansion "${ADDITIONALFLAGS}" has two limitations:

  1. Empty string argument: When ADDITIONALFLAGS="" (the default), the command receives an empty string as an argument rather than no argument, which may be passed to SCUMServer.exe unnecessarily.

  2. Single-argument limitation: Multiple flags like ADDITIONALFLAGS="-flag1 -flag2" would be passed as a single argument "-flag1 -flag2" instead of two separate arguments.

Using unquoted expansion would resolve both issues: empty values would expand to nothing (no argument added), and multiple flags would be split via word splitting.

🔎 Proposed fix
     -port=${GAMEPORT:-7777} \
     -QueryPort=${QUERYPORT:-27015} \
     -MaxPlayers=${MAXPLAYERS:-32} \
-    "${ADDITIONALFLAGS}" &
+    ${ADDITIONALFLAGS} &

Security note: Unquoted expansion enables shell expansion and word splitting, but the security risk is acceptable here since ADDITIONALFLAGS is controlled by the server administrator through docker-compose.yml.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 587b0b9 and 3b49c52.

📒 Files selected for processing (3)
  • README.md
  • docker-compose.yml
  • start-server.sh
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: EvilOlaf
Repo: EvilOlaf/scum PR: 8
File: README.md:53-56
Timestamp: 2025-11-26T08:22:42.142Z
Learning: In the EvilOlaf/scum repository, providing detailed help with customizing the gaming experience (such as extensive SCUM server configuration guidance) is out of scope. The repository focuses on the Docker container setup rather than comprehensive game server customization documentation.
🔇 Additional comments (2)
docker-compose.yml (1)

10-10: LGTM!

The environment variable definition follows the established pattern and provides a reasonable default.

README.md (1)

68-71: LGTM!

Clear documentation with a practical example. The YAML syntax is correct and the FAQ placement is logical.

@EvilOlaf EvilOlaf merged commit dfeebea into main Jan 5, 2026
4 checks passed
@EvilOlaf EvilOlaf deleted the additionalflags branch January 5, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant